package com.xinchuang.domain.type;

import java.util.ArrayList;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.List;

/**
 * 吉利零件名称报价
 */
public enum JlNameEnum {

    CAVITY_MATERIAL("原材料", "型腔材料"),
    CORE_MATERIAL("原材料", "型芯材料"),
    TEMPLATE_MATERIAL("原材料", "上、下码模板"),
    EJECTOR_MATERIAL("原材料", "顶针板"),
    SUPPORTING_MATERIAL("原材料", "支撑方铁"),
    HOT_RUNNER_MATERIAL("原材料", "热流道板+B板"),
    SLIDER_MATERIAL("原材料", "滑块/斜顶"),
    ELECTRODE_MATERIAL("原材料", "电极"),

    HOT_RUNNER_COMPONENT("标准件","热流道"),
    HYDRO_COMPONENT("标准件","油缸"),
    GAS_COMPONENT("标准件","氮气弹簧"),
    COLLECTOR_COMPONENT("标准件","集水器"),
    WATER_COMPONENT("标准件","集水接头"),
    OIL_COMPONENT("标准件","集油接头"),
    MAIN_COMPONENT("标准件","主吊环"),
    THIMBLE_COMPONENT("标准件","顶针/顶杆"),
    AUXILIARY_COMPONENT("标准件","辅材（螺栓螺钉等）"),


    SCANNING_FEE( "人工","扫描测绘"),
    STRUCTURE_FEE( "人工","结构设计"),
    CAM_FEE( "人工","CAM"),
    MANAGER_FEE( "人工","管理"),
    ACCOMPANIED_FEE( "人工","陪产"),


    MOLD_FEE( "制造","模架加工"),
    MACHINE_FEE( "制造","机床（普通）"),
    NUMERICAL1_FEE( "制造","数控（小）"),
    NUMERICAL2_FEE( "制造","数控（3+2）"),
    NUMERICAL3_FEE( "制造","数控（5轴）"),
    CNC_FEE( "制造","电极CNC"),
    SPARK_BIG_FEE( "制造","电火花（大）"),
    SPARK_FEE( "制造","电火花（小）"),
    DEEP_FEE( "制造","深孔钻"),
    WIRE_FEE( "制造","线切割"),
    MACHINE2_FEE( "制造","合模机"),
    BURNISHING_FEE( "制造","抛光"),
    HEAT_FEE( "制造","热处理（调质）"),


    ASSEMBLY_FEE("装配", "钳工"),

    TRYOUT_OBJ("调试","试模"),
    DEBUG_OBJ("调试","回厂调试"),


    MEASURE_FEE( "测量","型腔"),
    PRODUCT_FEE( "测量","产品"),

    TRANSPORT_FEE("运输","模具运输");

    private String type;

    private String itemName;

    JlNameEnum(String type, String itemName) {
        this.type = type;
        this.itemName = itemName;
    }

    public String getType() {
        return type;
    }

    public String getItemName() {
        return itemName;
    }

    public static List<JlNameEnum> getJlNameEnumListByType(String type){
            List<JlNameEnum> list = new ArrayList<>();
            for (JlNameEnum jlNameEnum : EnumSet.allOf(JlNameEnum.class)) {
               if(type.equals(jlNameEnum.type)){
                   list.add(jlNameEnum);
               }
            }
        return list;
    }
}
